package com.yatong.commons.util;

import com.github.pagehelper.PageInfo;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: YaTong
 * @description: page封装
 * @author: Mr.Guo
 * @create: 2018-10-17 14:35
 **/
public class PageData {
    public Map<String, Object> ResultMap(PageInfo page) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("total", page.getTotal());
        map.put("rows", page.getList());
        return map;
    }
}
